package com.example.gaomeili;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

public class first_activity extends AppCompatActivity {

@Override
   protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_first);
    findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view){
            Intent intent=new Intent(first_activity.this,second_activity.class);
            intent.putExtra("data","This is our first activity!");
            startActivity(intent);

        }
    });
}
}
